package com.feeling.oafeeling.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.feeling.oafeeling.pojo.SysUser;

import java.util.List;

public interface ISysUserService extends IService<SysUser> {
    public SysUser selectUserByUser();

    public SysUser findByUsername(SysUser user);

    public SysUser findById(Long id);

    SysUser findFromId(Long id);

//    List<SysUser> findOne(Long userId, String nickName, String deptName, Integer status);
    List<SysUser> findOne(SysUser user);

    public boolean updatePassword(SysUser user,String password);

    public boolean updateUser(SysUser user);

//    IPage<SysUser> getPage(int currentPage, int pageSize, SysUser user);

    List<SysUser> findByPage(int currentPage, int pageSize, SysUser user);

    Boolean insertUser(SysUser user);


    public SysUser findUserAndRoleById(Long id);
    Boolean updateInstitutionForUser(SysUser user, String institutionName);

    Boolean updatePasswordForUser(SysUser user);

    Boolean defaultUserNameSet(SysUser user);

    Boolean updateFromId(SysUser user);


    String selectDeptNameById(Long deptId);

    Integer getUserSize();
}
